
<h2>Login Page</h2>

<fieldset>
  <legend>Oauth</legend>
  <p>
    <button  class="btn btn-primary" ng-click="anonymousLogin()">Anonymous</button>
    <button  class="btn btn-primary" ng-click="oauthLogin('facebook')">Facebook</button>
    <button  class="btn btn-primary" ng-click="oauthLogin('google')">Google</button>
    <button  class="btn btn-primary" ng-click="oauthLogin('twitter')">Twitter</button>
    <button  class="btn btn-primary" ng-click="oauthLogin('github')">GitHub</button>
  </p>
</fieldset>

<form role="form">
  <p class="form-group">
    <label for="loginEmail">email</label>
    <input id="loginEmail" required name="email" type="email" ng-model="email" class="form-control" />
  </p>
  <p class="form-group">
    <label for="loginPass">password</label>
    <input id="loginPass" required name="pass" type="password" ng-model="pass" class="form-control" />
  </p>
  <p class="form-group" ng-cloak ng-show="createMode">
    <label for="loginConfirm">confirm pass</label>
    <input id="loginConfirm" required name="confirm" type="password" ng-model="confirm" class="form-control" />
  </p>

  <p>
    <button  class="btn btn-primary" ng-click="passwordLogin(email, pass)" ng-hide="createMode">Log In</button>
    <button  class="btn btn-default" ng-click="createMode = true" ng-hide="createMode">Register</button>
    <button  class="btn btn-primary" ng-cloak ng-show="createMode"
            ng-click="createAccount(email, pass, confirm)">Create Account</button>
    <button  class="btn btn-default" ng-cloak ng-show="createMode" ng-click="createMode = false">Cancel</button>
  </p>
</form>
<p ng-show="err" class="bg-danger">{{err}}</p>

